package com.fas.system.mapper;

import com.fas.system.domain.FasInspectionRecord;
import com.fas.system.domain.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FasInspectionRecordMapper {

    int submit(FasInspectionRecord fasInspectionRecord);

    FasInspectionRecord findByFacilityAndTaskId(FasInspectionRecord fasInspectionRecord);

    int selectTotalByTaskId(Long taskId);

    /**
     * 查询该设施完成情况
     * @return
     */
    int findFacilityCompleteStatus(@Param("facilityId")Integer facilityId,@Param("taskId") Long taskId);

    List<InspectionRecodeVo> findAllRecord(InspectionRecodeVo inspectionRecodeVo);

    List<MissedInspectionVo> missedInspection(MissedInspectionVo missedInspectionVo);

    /**
     * 查询设施的数据项值
     * @param facilityId    设施id
     * @param taskId    巡检任务id
     * @return
     */
    List<FacilityDataItemValueVo> findDataItemValue(@Param("facilityId")Integer facilityId,@Param("taskId") Long taskId,@Param("facilityType")Integer facilityType);

    /**
     * 查询上传方式
     * @param facilityId
     * @param taskId
     * @return
     */
    Integer selectTreatmentMethod(@Param("facilityId")Integer facilityId,@Param("taskId") Long taskId);

    int existsRecord(FasInspectionRecord fasInspectionRecord);

    List<FacilityRecordVo> findFacilityOrderPage(FacilityRecordVo facilityRecordVo);

    FacilityRecordDetailVo findAuditDetails(Integer id);

    List<EquipmentWordVo> findDeviceOrderPage(EquipmentWordVo equipmentWordVo);

    EquipmentWordVo findEquipmentDetails(Integer id);
}
